<extend name="_Layout/layout"/> 
 <block name="main">
<div class="raise right clearfix">
<script src="./Application/Home/View/default/Recharge/css/base64.js"></script>
<script src="./Application/Home/View/default/Recharge/css/Fnc.js"></script>
<style>
.zzzn a{ display:block; float:right; margin:20px; padding:8px 20px; color:#fff; background:#82b52d; font-size: 20px; border-radius:30px; text-decoration:none;}
.zzzn a:hover{ background:#90c13e;}
.ul_recharge_padding{padding:20px 0 0px 160px;}
.recharge_tips{color:#f00; line-height:40px; margin:0;}
.recharge_left_input{margin-left:16px;}
.help_link{ line-height:40px; color:#2471cb; text-decoration:underline; font-size:14px;}
.help_link:hover{ color:#f30;}
.help_link1{ color:#;}
.ebank_pay{font-family: Arial,"微软雅黑"; width:260px; height:40px; color:#fff; font-size:16px; line-height: 40px; text-align: center; margin:0 auto; background:#f60; display: block; text-decoration: none; border: 0;}
.ebank_pay:hover{ background: #f70; color:#fff; text-decoration: none; cursor: pointer;}

.box_close{ height:24px; line-height:24px; width:24px; text-align:center; font-size:14px; color:#999; border-radius:20px; position:absolute; top:10px; right:10px; text-decoration:none; font-family:Arial;}
.box_close:hover{ color:#fff; background:#f00; text-decoration:none;}
.choice_ebank .note1{ width:100px; text-align:right; display:block; float:left; margin-right:5px; line-height:40px;}
.layui-layer-content{text-align:center; margin-top:80px;font-size: 20px;color: #666;text-align: center;}
.layui-layer-content .yes {
    width: 160px; height: 40px;margin-top:80px;
    text-align: center;
    line-height: 40px;
    font-size: 14px;
	background: #4b7100;
    color: #fff;
	border:none;
    text-decoration: none;}
.fkbtn{
    width: 80px;
    height: 30px;
    color: #f60;
	border:1px #f60 solid;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
    line-height: 30px;
    text-align: center;
}
.fkbtn:hover{ color:#f60 !important;}

</style>
	<name id="realname" data="暂无"></name>
<div class="ybc_list">
    <div class="ybcoin clearfix">
        <h2 class="left">CNY提现</h2>      
    </div>
    <div class="support_ybc pass_ybc ybc_optimize" id="verifyon">
        <div id="tagContent" class="passContent">
            <div class="tagContent selectTag" id="tagContent0">
               <ul class="ybc_optimize_con ul_recharge_padding" id="rollout2" style="margin-top:30px;">                  
                    <li style="margin-top:0; position:relative;" class="choice_ebank">
                        <span class="note1" style="color:#333;font-size:12px;">金额</span>
                        <input name="number" id="over_num" class="money num_three" onkeyup="value=value.replace(/[^\d]/g,&#39;&#39;);notfee();" autocomplete="off" maxlength="10" type="text">
                        <span class="note" style="margin-left: 5px;">最小提现金额100元。</span>
                        <input id="rand_num" value="0" type="hidden">
                    </li>
                    <li class="num_money choice_ebank" style="margin-left:105px; position:relative;">
                        <span class="left">到账金额：</span>
                        <font id="ure" class="left" color="red"></font>
                        <span class="note" style="position:absolute; top:0; right:-270px; color:#f00; font-size:14px; line-height:20px;">手续费{$fee}%</span>
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1" style="color:#333;font-size:12px;" id="recharge_name">开户姓名</span>
						<input id="uname" class="money num_three" value=""   type="text">
                        <span class="note" style="margin-left: 5px;">系统只接受您实名账户提现</span>
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">开户行</span>
                        <input id="bankarea" class="money num_three" type="text" value="{$bankarea}">
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">银行名称</span>
                        <select class="money num_three" id="bankname" name="bankname" style="width:259px; height:40px;">
                            <option selected="selected" value="请选择银行">请选择银行</option>
                            <volist name="bank_list" id="vo">
                            <option value="{$vo.id}">{$vo.bankName}</option>
                            </volist>
                        </select>
                        <span class="note" style="position:absolute; top:0; color:#f00; font-size:13px; line-height:20px;">请注意：部分银行周末汇款，不能及时到账。</span>
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">银行卡号</span>
                        <input id="banknum" class="money num_three" type="text">                       
                    </li>           
                    
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">用户备注</span>
                        <input id="remark_user" class="money num_three" type="text">                        
                    </li>
                    <li style="margin-top:10px; position:relative;" class="choice_ebank">
                        <span class="note1 recharge_left_input" style="color:#333;font-size:12px; margin-left:0;" id="recharge_account">手机号</span>
                        <input id="mobile" class="money num_three" type="text">                        
                    </li>
                    <li style="color:#f00; font-size:16px; margin-top:20px; margin-left:99px;" class="choice_ebank"></li>
                    <li>
                    <a href="javascript:void(0);" onclick="recharge()" class="btn_turn" id="choice_submit" style="margin-left:105px;">生成提现订单</a></li>
                </ul>
                <div class="turns truns_upper">
                    <h2></h2>
                 </div>              
            </div>           
        </div>
    </div>
</div>
<table class="raise_list" style="border:1px solid #e1e1df;" align="center" border="0" cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th>记录ID</th>
            <th>提现数量</th>
            <th>手续费</th>
            <th>实际到账</th>
            <th>提现人姓名</th>
            <th>提现银行</th>
            <th>提现银行账号</th>
            <th>开户行</th>
            <th>申请时间</th>
            <th>状态</th>
        </tr>
    </thead>
    <tbody>
    <volist name="tx_list" id="vo">
	    <tr>
		    <td>{$vo.withdraw_id}</td>
		    <td>{$vo.all_money}</td>
		    <td>{$vo.withdraw_fee}</td>
		    <td>{$vo.money}</td>
		    <td>{$vo.uid|get_uname}</td>
		    <td>{$vo.bank_id|get_bankname}</td>
		    <td>{$vo.banknum}</td>
		    <td>{$vo.bankarea}</td>
		    <td>{$vo.add_time|time_format}</td>
		    <td>{$vo.status|get_status_text}</td>
	    </tr>   
    </volist>
	</tbody>
</table>
</div>
<div class="clear"></div>
</div>
</div>   
<script>
function closewin(){
	$(".layui-layer-shade").remove();
	$(".layui-layer").remove();
}
function notfee(){
	if($("#over_num").val()!=""){
		var num=parseInt($("#over_num").val(),10);
		var fee={$fee};
		var sjnum=num-(fee/100)*num;
		$("#ure").text((sjnum).toFixed(3));
	}else{
		$("#ure").text("");
	}
}
function recharge(){
    var min_num=100;
    var max_num=1000000;
	var fee={$fee};
	if (this.choice_money == 0) {
        $('.ebank_box_common').show();
        return false;
    }
    // 充值金额
    var over_num = $('#over_num').val();
    var number = over_num ? over_num: 0;
	var rand_num = $('#rand_num').val();
    rand_num = rand_num ? rand_num: 0;
	
    var num = parseInt(number) + parseFloat(rand_num);
    var shiji_num = num-(fee/100)*num;
    if(num < min_num) {
	   layer.open({
			type: 1,
			title: false,
			skin: 'layui-layer-demo', //样式类名
			closeBtn: 0, //不显示关闭按钮
			shift: 2,
			shadeClose: true, //开启遮罩关闭
			content: '<div>提现金额不能小于'+min_num+'元</div><div><button type="button" class="yes" onclick="closewin()">确定</button>',
			area: ['420px', '280px'], //宽高
		});
        return false;
    }
    var umane=$('#uname').val();
    var bankname=$('#bankname').val();
    var banknum=$('#banknum').val();//会员银行卡号
    var remark_user=$('#remark_user').val();
    var mobile=$('#mobile').val();
	var url="{:U('Home/Withdrawals/add_ajax')}";
	if(umane == ""){
		alert('姓名不能为空！');
		 return false;
	}
	if(bankarea == ""){
		alert('请填写开户行！');
		 return false;
	}
	if(bankname == ""){
		alert('请选择银行！');
		 return false;
	}
	
	if(banknum == ""){
		alert('请填写银行卡号！');
		 return false;
	}
	if(mobile == ""){
		alert('请填写手机号！');
		 return false;
	}	
	if (!$("#mobile").val().match(/^(((13[0-9]{1})|159|153)+\d{8})$/)) { 
	$.getJSON(url,{num:num,shiji_num:shiji_num,fee:fee,umane:umane,bankname:bankname,banknum:banknum,remark_user:remark_user,mobile:mobile},function(json){
		if(json.status>0)
			{
			alert(json.msg);
				 setTimeout(function(){
					location.reload();
					},2000);
			}else{
				alert(json.msg);
			}
    });	
};
</script>
<script>
    $(".menu12").addClass("uc-current");
    function showTips(id,msg){
        var tips = layer.tips(msg, id, {
            tips: [1, '#fff8db'],
            area: ['400px', '35px']
        });
        $(id).on('mouseout', function(){
            layer.close(tips);
        });
    }
</script>
<style>
.rightwidth{ width:340px;}
</style>
</block>